package com.bigegg.employee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bigegg.employee.mapper.ActivityBoothMapper;
import com.bigegg.employee.domain.ActivityBooth;
import com.bigegg.employee.service.IActivityBoothService;

/**
 * 活动展位Service业务层处理
 * 
 * @author sun
 * @date 2022-08-15
 */
@Service
public class ActivityBoothServiceImpl implements IActivityBoothService 
{
    @Autowired
    private ActivityBoothMapper activityBoothMapper;

    /**
     * 查询活动展位
     * 
     * @param id 活动展位主键
     * @return 活动展位
     */
    @Override
    public ActivityBooth selectActivityBoothById(Long id)
    {
        return activityBoothMapper.selectActivityBoothById(id);
    }

    /**
     * 查询活动展位列表
     * 
     * @param activityBooth 活动展位
     * @return 活动展位
     */
    @Override
    public List<ActivityBooth> selectActivityBoothList(ActivityBooth activityBooth)
    {
        return activityBoothMapper.selectActivityBoothList(activityBooth);
    }

    /**
     * 新增活动展位
     * 
     * @param activityBooth 活动展位
     * @return 结果
     */
    @Override
    public int insertActivityBooth(ActivityBooth activityBooth)
    {
        activityBooth.setCreateTime(DateUtils.getNowDate());
        return activityBoothMapper.insertActivityBooth(activityBooth);
    }

    /**
     * 修改活动展位
     * 
     * @param activityBooth 活动展位
     * @return 结果
     */
    @Override
    public int updateActivityBooth(ActivityBooth activityBooth)
    {
        return activityBoothMapper.updateActivityBooth(activityBooth);
    }

    /**
     * 批量删除活动展位
     * 
     * @param ids 需要删除的活动展位主键
     * @return 结果
     */
    @Override
    public int deleteActivityBoothByIds(Long[] ids)
    {
        return activityBoothMapper.deleteActivityBoothByIds(ids);
    }

    /**
     * 删除活动展位信息
     * 
     * @param id 活动展位主键
     * @return 结果
     */
    @Override
    public int deleteActivityBoothById(Long id)
    {
        return activityBoothMapper.deleteActivityBoothById(id);
    }
}
